#ifndef XOROOM_H
#define XOROOM_H

#include "FKRoom.h"

#include "XOArea.h"
#include "XOSection.h"

class FK_OBJECT(XORoom,FKRoom)
    Q_OBJECT
public:
	void loadCore();
	void initStart();
    void loadUser(FKUser* user);
	void nextTurn();
    bool checkWin(const QPoint& p);
    QString roomType() const{return QString(tr("X vs O game"));}
private slots:
    void sectionClicked(QPoint p);
private:
    void customInitialization();
    void customDeinitialization();
    bool startCondition();

    FKWorldReferent* worldClass()const;
    FKRoomInterface* interfaceClass()const;

    XOArea* _field;
    QMap<qint32,qint8> _marks;
    qint32 _currentActor;

    struct Servant{
	};
	struct CustomValues{
	};
};

FK_ROOM_MODULE("X vs O",XORoom,XvsOGame,"1.0.0"){
    FKSystemObject::addClass<XOArea>();
    FKSystemObject::addClass<XOSection>();
}

#endif
